package com.aspose.cells;

class zadv {
   static void a(zafg var0, int var1) throws Exception {
      var0.b(" var c_rgszClr=new Array(8);");
      var0.b(" c_rgszClr[0]=\"window\";");
      var0.b(" c_rgszClr[1]=\"buttonface\";");
      var0.b(" c_rgszClr[2]=\"windowframe\";");
      var0.b(" c_rgszClr[3]=\"windowtext\";");
      var0.b(" c_rgszClr[4]=\"threedlightshadow\";");
      var0.b(" c_rgszClr[5]=\"threedhighlight\";");
      var0.b(" c_rgszClr[6]=\"threeddarkshadow\";");
      var0.b(" c_rgszClr[7]=\"threedshadow\";");
      var0.g();
      var0.b(" var g_iShCur;");
      var0.b(" var g_rglTabX=new Array(c_lTabs);");
      var0.g();
      var0.b("function fnGetIEVer()");
      var0.b("{");
      var0.b(" var ua=window.navigator.userAgent");
      var0.b(" var msie=ua.indexOf(\"MSIE\")");
      var0.b(" if (msie>0 && window.navigator.platform==\"Win32\")");
      var0.b("  return parseInt(ua.substring(msie+5,ua.indexOf(\".\", msie)));");
      var0.b(" else");
      var0.b("  return 0;");
      var0.b("}");
      var0.g();
      var0.b("function fnBuildFrameset()");
      var0.b("{");
      var0.b(" var szHTML=\"<frameset rows=\\\"*,18\\\" border=0 width=0 frameborder=no framespacing=0>\"+");
      var0.b("  \"<frame src=\\\"\"+document.all.item(\"shLink\")[" + var1 + "].href+\"\\\" name=\\\"frSheet\\\" noresize>\"+");
      var0.b("  \"<frameset cols=\\\"54,*\\\" border=0 width=0 frameborder=no framespacing=0>\"+");
      var0.b("  \"<frame src=\\\"\\\" name=\\\"frScroll\\\" marginwidth=0 marginheight=0 scrolling=no>\"+");
      var0.b("  \"<frame src=\\\"\\\" name=\\\"frTabs\\\" marginwidth=0 marginheight=0 scrolling=no>\"+");
      var0.b("  \"</frameset></frameset><plaintext>\";");
      var0.g();
      var0.b(" with (document) {");
      var0.b("  open(\"text/html\",\"replace\");");
      var0.b("  write(szHTML);");
      var0.b("  close();");
      var0.b(" }");
      var0.g();
      var0.b(" fnBuildTabStrip();");
      var0.b("}");
      var0.g();
      var0.b("function fnBuildTabStrip()");
      var0.b("{");
      var0.b(" var szHTML=");
      var0.b("  \"<html><head><style>.clScroll {font:8pt Courier New;color:\"+c_rgszClr[6]+\";cursor:default;line-height:10pt;}\"+");
      var0.b("  \".clScroll2 {font:10pt Arial;color:\"+c_rgszClr[6]+\";cursor:default;line-height:11pt;}</style></head>\"+");
      var0.b("  \"<body onclick=\\\"event.returnValue=false;\\\" ondragstart=\\\"event.returnValue=false;\\\" onselectstart=\\\"event.returnValue=false;\\\" bgcolor=\"+c_rgszClr[4]+\" topmargin=0 leftmargin=0><table cellpadding=0 cellspacing=0 width=100%>\"+");
      var0.b("  \"<tr><td colspan=6 height=1 bgcolor=\"+c_rgszClr[2]+\"></td></tr>\"+");
      var0.b("  \"<tr><td style=\\\"font:1pt\\\">&nbsp;<td>\"+");
      var0.b("  \"<td valign=top id=tdScroll class=\\\"clScroll\\\" onclick=\\\"parent.fnFastScrollTabs(0);\\\" onmouseover=\\\"parent.fnMouseOverScroll(0);\\\" onmouseout=\\\"parent.fnMouseOutScroll(0);\\\"><a>&#171;</a></td>\"+");
      var0.b("  \"<td valign=top id=tdScroll class=\\\"clScroll2\\\" onclick=\\\"parent.fnScrollTabs(0);\\\" ondblclick=\\\"parent.fnScrollTabs(0);\\\" onmouseover=\\\"parent.fnMouseOverScroll(1);\\\" onmouseout=\\\"parent.fnMouseOutScroll(1);\\\"><a>&lt</a></td>\"+");
      var0.b("  \"<td valign=top id=tdScroll class=\\\"clScroll2\\\" onclick=\\\"parent.fnScrollTabs(1);\\\" ondblclick=\\\"parent.fnScrollTabs(1);\\\" onmouseover=\\\"parent.fnMouseOverScroll(2);\\\" onmouseout=\\\"parent.fnMouseOutScroll(2);\\\"><a>&gt</a></td>\"+");
      var0.b("  \"<td valign=top id=tdScroll class=\\\"clScroll\\\" onclick=\\\"parent.fnFastScrollTabs(1);\\\" onmouseover=\\\"parent.fnMouseOverScroll(3);\\\" onmouseout=\\\"parent.fnMouseOutScroll(3);\\\"><a>&#187;</a></td>\"+");
      var0.b("  \"<td style=\\\"font:1pt\\\">&nbsp;<td></tr></table></body></html>\";");
      var0.g();
      var0.b(" with (frames['frScroll'].document) {");
      var0.b("  open(\"text/html\",\"replace\");");
      var0.b("  write(szHTML);");
      var0.b("  close();");
      var0.b(" }");
      var0.g();
      var0.b(" szHTML =");
      var0.b("  \"<html><head>\"+");
      var0.b("  \"<style>A:link,A:visited,A:active {text-decoration:none;\"+\"color:\"+c_rgszClr[3]+\";}\"+");
      var0.b("  \".clTab {cursor:hand;background:\"+c_rgszClr[1]+\";font:9pt Arial;padding-left:3px;padding-right:3px;text-align:center;}\"+");
      var0.b("  \".clBorder {background:\"+c_rgszClr[2]+\";font:1pt;}\"+");
      var0.b("  \"</style></head><body onload=\\\"parent.fnInit();\\\" onselectstart=\\\"event.returnValue=false;\\\" ondragstart=\\\"event.returnValue=false;\\\" bgcolor=\"+c_rgszClr[4]+");
      var0.b("  \" topmargin=0 leftmargin=0><table id=tbTabs cellpadding=0 cellspacing=0>\";");
      var0.g();
      var0.b(" var iCellCount=(c_lTabs+1)*2;");
      var0.g();
      var0.b(" var i;");
      var0.b(" for (i=0;i<iCellCount;i+=2)");
      var0.b("  szHTML+=\"<col width=1><col>\";");
      var0.g();
      var0.b(" var iRow;");
      var0.b(" for (iRow=0;iRow<6;iRow++) {");
      var0.g();
      var0.b("  szHTML+=\"<tr>\";");
      var0.g();
      var0.b("  if (iRow==5)");
      var0.b("   szHTML+=\"<td colspan=\"+iCellCount+\"></td>\";");
      var0.b("  else {");
      var0.b("   if (iRow==0) {");
      var0.b("    for(i=0;i<iCellCount;i++)");
      var0.b("     szHTML+=\"<td height=1 class=\\\"clBorder\\\"></td>\";");
      var0.b("   } else if (iRow==1) {");
      var0.b("    for(i=0;i<c_lTabs;i++) {");
      var0.b("     szHTML+=\"<td height=1 nowrap class=\\\"clBorder\\\">&nbsp;</td>\";");
      var0.b("     szHTML+=");
      var0.b("      \"<td id=tdTab height=1 nowrap class=\\\"clTab\\\" onmouseover=\\\"parent.fnMouseOverTab(\"+i+\");\\\" onmouseout=\\\"parent.fnMouseOutTab(\"+i+\");\\\">\"+");
      var0.b("      \"<a href=\\\"\"+document.all.item(\"shLink\")[i].href+\"\\\" target=\\\"frSheet\\\" id=aTab>&nbsp;\"+c_rgszSh[i]+\"&nbsp;</a></td>\";");
      var0.b("    }");
      var0.b("    szHTML+=\"<td id=tdTab height=1 nowrap class=\\\"clBorder\\\"><a id=aTab>&nbsp;</a></td><td width=100%></td>\";");
      var0.b("   } else if (iRow==2) {");
      var0.b("    for (i=0;i<c_lTabs;i++)");
      var0.b("     szHTML+=\"<td height=1></td><td height=1 class=\\\"clBorder\\\"></td>\";");
      var0.b("    szHTML+=\"<td height=1></td><td height=1></td>\";");
      var0.b("   } else if (iRow==3) {");
      var0.b("    for (i=0;i<iCellCount;i++)");
      var0.b("     szHTML+=\"<td height=1></td>\";");
      var0.b("   } else if (iRow==4) {");
      var0.b("    for (i=0;i<c_lTabs;i++)");
      var0.b("     szHTML+=\"<td height=1 width=1></td><td height=1></td>\";");
      var0.b("    szHTML+=\"<td height=1 width=1></td><td></td>\";");
      var0.b("   }");
      var0.b("  }");
      var0.b("  szHTML+=\"</tr>\";");
      var0.b(" }");
      var0.g();
      var0.b(" szHTML+=\"</table></body></html>\";");
      var0.b(" with (frames['frTabs'].document) {");
      var0.b("  open(\"text/html\",\"replace\");");
      var0.b("  charset=document.charset;");
      var0.b("  write(szHTML);");
      var0.b("  close();");
      var0.b(" }");
      var0.b("}");
      var0.g();
      var0.b("function fnInit()");
      var0.b("{");
      var0.b(" g_rglTabX[0]=0;");
      var0.b(" var i;");
      var0.b(" for (i=1;i<=c_lTabs;i++)");
      var0.b("  with (frames['frTabs'].document.all.tbTabs.rows[1].cells[fnTabToCol(i-1)])");
      var0.b("   g_rglTabX[i]=offsetLeft+offsetWidth-6;");
      var0.b("}");
      var0.g();
      var0.b("function fnTabToCol(iTab)");
      var0.b("{");
      var0.b(" return 2*iTab+1;");
      var0.b("}");
      var0.g();
      var0.b("function fnNextTab(fDir)");
      var0.b("{");
      var0.b(" var iNextTab=-1;");
      var0.b(" var i;");
      var0.g();
      var0.b(" with (frames['frTabs'].document.body) {");
      var0.b("  if (fDir==0) {");
      var0.b("   if (scrollLeft>0) {");
      var0.b("    for (i=0;i<c_lTabs&&g_rglTabX[i]<scrollLeft;i++);");
      var0.b("    if (i<c_lTabs)");
      var0.b("     iNextTab=i-1;");
      var0.b("   }");
      var0.b("  } else {");
      var0.b("   if (g_rglTabX[c_lTabs]+6>offsetWidth+scrollLeft) {");
      var0.b("    for (i=0;i<c_lTabs&&g_rglTabX[i]<=scrollLeft;i++);");
      var0.b("    if (i<c_lTabs)");
      var0.b("     iNextTab=i;");
      var0.b("   }");
      var0.b("  }");
      var0.b(" }");
      var0.b(" return iNextTab;");
      var0.b("}");
      var0.g();
      var0.b("function fnScrollTabs(fDir)");
      var0.b("{");
      var0.b(" var iNextTab=fnNextTab(fDir);");
      var0.g();
      var0.b(" if (iNextTab>=0) {");
      var0.b("  frames['frTabs'].scroll(g_rglTabX[iNextTab],0);");
      var0.b("  return true;");
      var0.b(" } else");
      var0.b("  return false;");
      var0.b("}");
      var0.g();
      var0.b("function fnFastScrollTabs(fDir)");
      var0.b("{");
      var0.b(" if (c_lTabs>16)");
      var0.b("  frames['frTabs'].scroll(g_rglTabX[fDir?c_lTabs-1:0],0);");
      var0.b(" else");
      var0.b("  if (fnScrollTabs(fDir)>0) window.setTimeout(\"fnFastScrollTabs(\"+fDir+\");\",5);");
      var0.b("}");
      var0.g();
      var0.b("function fnSetTabProps(iTab,fActive)");
      var0.b("{");
      var0.b(" var iCol=fnTabToCol(iTab);");
      var0.b(" var i;");
      var0.g();
      var0.b(" if (iTab>=0) {");
      var0.b("  with (frames['frTabs'].document.all) {");
      var0.b("   with (tbTabs) {");
      var0.b("    for (i=0;i<=4;i++) {");
      var0.b("     with (rows[i]) {");
      var0.b("      if (i==0)");
      var0.b("       cells[iCol].style.background=c_rgszClr[fActive?0:2];");
      var0.b("      else if (i>0 && i<4) {");
      var0.b("       if (fActive) {");
      var0.b("        cells[iCol-1].style.background=c_rgszClr[2];");
      var0.b("        cells[iCol].style.background=c_rgszClr[0];");
      var0.b("        cells[iCol+1].style.background=c_rgszClr[2];");
      var0.b("       } else {");
      var0.b("        if (i==1) {");
      var0.b("         cells[iCol-1].style.background=c_rgszClr[2];");
      var0.b("         cells[iCol].style.background=c_rgszClr[1];");
      var0.b("         cells[iCol+1].style.background=c_rgszClr[2];");
      var0.b("        } else {");
      var0.b("         cells[iCol-1].style.background=c_rgszClr[4];");
      var0.b("         cells[iCol].style.background=c_rgszClr[(i==2)?2:4];");
      var0.b("         cells[iCol+1].style.background=c_rgszClr[4];");
      var0.b("        }");
      var0.b("       }");
      var0.b("      } else");
      var0.b("       cells[iCol].style.background=c_rgszClr[fActive?2:4];");
      var0.b("     }");
      var0.b("    }");
      var0.b("   }");
      var0.b("   with (aTab[iTab].style) {");
      var0.b("    cursor=(fActive?\"default\":\"hand\");");
      var0.b("    color=c_rgszClr[3];");
      var0.b("   }");
      var0.b("  }");
      var0.b(" }");
      var0.b("}");
      var0.g();
      var0.b("function fnMouseOverScroll(iCtl)");
      var0.b("{");
      var0.b(" frames['frScroll'].document.all.tdScroll[iCtl].style.color=c_rgszClr[7];");
      var0.b("}");
      var0.b("");
      var0.b("function fnMouseOutScroll(iCtl)");
      var0.b("{");
      var0.b(" frames['frScroll'].document.all.tdScroll[iCtl].style.color=c_rgszClr[6];");
      var0.b("}");
      var0.g();
      var0.b("function fnMouseOverTab(iTab)");
      var0.b("{");
      var0.b(" if (iTab!=g_iShCur) {");
      var0.b("  var iCol=fnTabToCol(iTab);");
      var0.b("  with (frames['frTabs'].document.all) {");
      var0.b("   tdTab[iTab].style.background=c_rgszClr[5];");
      var0.b("  }");
      var0.b(" }");
      var0.b("}");
      var0.g();
      var0.b("function fnMouseOutTab(iTab)");
      var0.b("{");
      var0.b(" if (iTab>=0) {");
      var0.b("  var elFrom=frames['frTabs'].event.srcElement;");
      var0.b("  var elTo=frames['frTabs'].event.toElement;");
      var0.g();
      var0.b("  if ((!elTo) ||");
      var0.b("   (elFrom.tagName==elTo.tagName) ||");
      var0.b("   (elTo.tagName==\"A\" && elTo.parentElement!=elFrom) ||");
      var0.b("   (elFrom.tagName==\"A\" && elFrom.parentElement!=elTo)) {");
      var0.g();
      var0.b("   if (iTab!=g_iShCur) {");
      var0.b("    with (frames['frTabs'].document.all) {");
      var0.b("     tdTab[iTab].style.background=c_rgszClr[1];");
      var0.b("    }");
      var0.b("   }");
      var0.b("  }");
      var0.b(" }");
      var0.b("}");
      var0.g();
      var0.b("function fnSetActiveSheet(iSh)");
      var0.b("{");
      var0.b(" if (iSh!=g_iShCur) {");
      var0.b("  fnSetTabProps(g_iShCur,false);");
      var0.b("  fnSetTabProps(iSh,true);");
      var0.b("  g_iShCur=iSh;");
      var0.b(" }");
      var0.b("}");
      var0.g();
      var0.b(" window.g_iIEVer=fnGetIEVer();");
      var0.b(" if (window.g_iIEVer>=4)");
      var0.b("  fnBuildFrameset();");
      var0.b("//-->");
      var0.g();
   }
}
